const express = require("express")
const app = express()
const gwc = require('../service/user/gwc')



app.get("/getgwc",async(req,res)=>{
    // console.log(req.query);
    let result = await gwc.getUsergwc(req.query.userId)
    console.log(result);
    res.send(result)
})
app.get("/addgwc",async(req,res)=>{
    console.log(req.query);
    let result = await gwc.addUsergwc(req.query.userId,req.query.goodsId,req.query.num)
    console.log(result);
    res.send(result)
})
app.get("/updategwcnum",async(req,res)=>{
    console.log(req.query);
    let result = await gwc.updateUsernum(req.query.userId,req.query.goodsId,req.query.num)
    console.log(result);
    res.send(result)
})


module.exports = app;